package com.easybuy.entity;

import java.time.LocalDateTime;

/**
 * EasybuyOrder 实体类
 * 对应数据库表 easybuy.easybuy_order
 */
public class EasybuyOrder {
    // 主键
    private Integer id;

    // 用户主键
    private Integer userId;

    // 登录名
    private String loginName;

    // 用户地址
    private String userAddress;

    // 创建时间
    private LocalDateTime createTime;

    // 总消费
    private Float cost;

    // 订单号
    private String serialNumber;

    // 无参构造函数
    public EasybuyOrder() {
    }

    // 带参构造函数
    public EasybuyOrder(Integer id, Integer userId, String loginName, String userAddress,
                       LocalDateTime createTime, Float cost, String serialNumber) {
        this.id = id;
        this.userId = userId;
        this.loginName = loginName;
        this.userAddress = userAddress;
        this.createTime = createTime;
        this.cost = cost;
        this.serialNumber = serialNumber;
    }

    // Getter 和 Setter 方法
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getUserAddress() {
        return userAddress;
    }

    public void setUserAddress(String userAddress) {
        this.userAddress = userAddress;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public Float getCost() {
        return cost;
    }

    public void setCost(Float cost) {
        this.cost = cost;
    }

    public String getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }

    @Override
    public String toString() {
        return "EasybuyOrder{" +
                "id=" + id +
                ", userId=" + userId +
                ", loginName='" + loginName + '\'' +
                ", userAddress='" + userAddress + '\'' +
                ", createTime=" + createTime +
                ", cost=" + cost +
                ", serialNumber='" + serialNumber + '\'' +
                '}';
    }
}